package cn.dy.sbo.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import cn.common.lib.springside.entity.AutoIdEntity;


@Entity
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class StepField extends AutoIdEntity{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String stepCode;
	private String field;
	private String fieldName;
	private Integer dataType;
	private Integer length;
	private Integer orderNum;
	private Flow	step;
	
	
	public Integer getOrderNum() {
		return orderNum;
	}
	public void setOrderNum(Integer orderNum) {
		this.orderNum = orderNum;
	}
	
	@Column(length=10)
	public String getStepCode() {
		return stepCode;
	}
	public void setStepCode(String stepCode) {
		this.stepCode = stepCode;
	}
	@Column(length=10)
	public String getField() {
		return field;
	}
	public void setField(String field) {
		this.field = field;
	}
	
	@Column(length=40)
	public String getFieldName() {
		return fieldName;
	}
	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}
	
	public Integer getDataType() {
		return dataType;
	}
	public void setDataType(Integer dataType) {
		this.dataType = dataType;
	}
	public Integer getLength() {
		return length;
	}
	public void setLength(Integer length) {
		this.length = length;
	}
	
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.LAZY)
    @NotFound(action = NotFoundAction.IGNORE)
	public Flow getStep() {
		return step;
	}
	public void setStep(Flow step) {
		this.step = step;
	}
	
	
}
